import sys
Import('flags')

env = Environment()
# This will usually be built from /mode/_source/_sdl.
# So, the actual headers are up three directories.
env.Append(CCFLAGS = ['-I' + str(Dir('../../../_source')), flags])
if sys.platform == 'darwin':
	env.Append(CCFLAGS = ['-I/Library/Frameworks/SDL.framework/Headers']);
else:
	env.ParseConfig('sdl-config --cflags')

sources = Glob('*.cpp')
# On Mac OS X, SDL apps need to have SDLMain.m compiled in.
if sys.platform == 'darwin':
	sources = ['SDLMain.m', sources]
env.Library('_sdl', sources)
